package com.javasm.service.MisMannageService.impl;


import com.javasm.dao.MisMannageDao.impl.ProdDaoImpl;
import com.javasm.entity.MisMannageEntity.ProdInfo;
import com.javasm.entity.MisMannageEntity.User;
import com.javasm.service.MisMannageService.ProdService;

import java.util.List;

/**
 * @author:JAVASM
 * @description:
 * @date:2022/5/23 21:17
 * @version:0.1
 * @since:jdk11
 */
public class ProdServiceImpl implements ProdService {
    /*@Override
    public Integer setAuditStatus(Integer setStatusProdId, String isPass) {
        ProdDao pd = new ProdDaoImpl();
        if ("未通过".equals(isPass)){
            isPass = "未通过";
        }else if ("已通过".equals(isPass)){
            isPass = "已通过";
        }
        return  pd.setAuditStatus(setStatusProdId, isPass);
    }*/

    @Override
    public String getReviewerName(Integer reviewerId) {
        return new ProdDaoImpl().getReviewerName(reviewerId);
    }

    @Override
    public ProdInfo getProdById(Integer queryProdId) {
        return new ProdDaoImpl().getProdById(queryProdId);
    }

    @Override
    public Integer editProd(ProdInfo editProd) {
        return new ProdDaoImpl().editProd(editProd);
    }

    @Override
    public Integer insertAsset(ProdInfo assetProd) {
        return new ProdDaoImpl().insertAsset(assetProd);
    }

    @Override
    public List<User> getUserToAudit(Integer userId) {
        return new ProdDaoImpl().getUserToAudit(userId);
    }

    @Override
    public Integer insertProd(ProdInfo insertProd) {
        return new ProdDaoImpl().insertProd(insertProd);
    }

    @Override
    public Integer prodTotalNum(ProdInfo queryProd, Integer userId) {
        return new ProdDaoImpl().prodTotalNum(queryProd,userId);
    }

    @Override
    public List<ProdInfo> getProdByPage(Integer page, Integer pageSize, ProdInfo queryProd, Integer userId) {
        return new ProdDaoImpl().getProdByPage(page,pageSize,queryProd,userId);
    }
}
